package org.agile2soft.nexoma.tapestry.encoder;

import org.agile2soft.nexoma.core.entities.ServiceOption;
import org.hibernate.SessionFactory;

import br.com.arsmachina.controller.Controller;
import br.com.arsmachina.tapestrycrud.hibernate.encoder.HibernateIntegerEncoder;

public class ServiceOptionEncoder extends HibernateIntegerEncoder<ServiceOption> {

    public ServiceOptionEncoder(SessionFactory sessionFactory,
            Controller<ServiceOption, Integer> controller) {
        super(sessionFactory, controller);
    }

    public String toLabel(ServiceOption serviceOption) {
        return serviceOption.getName();
    }

}
